﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria.ModLoader.IO
{
	// Token: 0x020002D1 RID: 721
	public class Vector2TagSerializer : TagSerializer<Vector2, TagCompound>
	{
		// Token: 0x06001BFC RID: 7164 RVA: 0x00014097 File Offset: 0x00012297
		public override TagCompound Serialize(Vector2 value)
		{
			TagCompound tagCompound = new TagCompound();
			tagCompound["x"] = value.X;
			tagCompound["y"] = value.Y;
			return tagCompound;
		}

		// Token: 0x06001BFD RID: 7165 RVA: 0x000140CA File Offset: 0x000122CA
		public override Vector2 Deserialize(TagCompound tag)
		{
			return new Vector2(tag.GetFloat("x"), tag.GetFloat("y"));
		}
	}
}
